<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Test Page for geoPolygonUtils.utils.correctAngles function</title>
  <script language="JavaScript" type="text/javascript"
      src="../tools/jsunit/app/jsUnitCore.js"></script>
  <script language="JavaScript" type="text/javascript"
      src="test-utils.js"></script>
  <script language="JavaScript" type="text/javascript"
      src="../src/geometry.js"></script>
  <script language="JavaScript" type="text/javascript"
      src="../src/utils.js"></script>
  <script language="JavaScript" type="text/javascript">

    // Alias for the Point class.
    var Point = geoPolygonUtils.geometry.Point;


    function testCorrectAnglesOfSquare() {
      square = [new Point(10, 10), new Point(11, 10),
                new Point(11, 11), new Point(10, 11)];
      corrected = geoPolygonUtils.correctAngles(
          square, Math.PI * 0.5, Math.PI * 0.05);

      assertVectorCoords(10, 10, corrected[0]);
      assertVectorCoords(11, 10, corrected[1]);
      assertVectorCoords(11, 11, corrected[2]);
      assertVectorCoords(10, 11, corrected[3]);
    };


  </script>
  <style>
    .code {
      color: green;
      font-weight: bold;
    }
  </style>
</head>
<body>
  <h1>Test Page for <span class="code">geoPolygonUtils.utils.correctAngles</span>
  function.</h1>
  <p>This page contains tests for the methods of <span class="code">
  geoPolygonUtils.utils.correctAngles</span> function. To see them take a look at the
  source of the page.</p>
  <p><em>Note:</em> this file is intended to be used with
  <a href="http://www.jsunit.net/">JSUnit</a> test framework.</p>
</body>
</html>
